<!-- AI告警督办-列表页（首页） -->
<template>
    <view class="index-all">
        <Header :title="title" bgColor="#fff" :leftIconSize="20" ></Header>
        <uv-sticky bgColor="#fff"  v-if="tabData.length != 0">
            <uv-tabs v-if="tabData.length>1" :list="tabData" @click="checkTab"
                     lineColor="#0068FD"
                     lineWidth="40"
                     :itemStyle="tabData.length>3?'color: #767676;height:45px;font-size: 12px;':'flex:1;color: #767676;height:40px;font-size: 12px;'"
                     :activeStyle="{color: '#0068FD'}"
            ></uv-tabs>
        </uv-sticky>
      <view :style="{height: `calc(100vh - 66px - ${topHeight.top}px)`,'overflow-y':'auto'}">
        <rectification-info v-if="selectTab === '1'" :id="id"></rectification-info>
        <alarm-details-info v-if="selectTab === '2'" :id="id" :urgeShow="urgeShow"></alarm-details-info>
      </view>
    </view>

</template>

<script setup>
import alarmDetailsInfo from "@/packagePcoCheck/pages/alarmInfo/alarmDetailsInfo.vue";
import rectificationInfo from "@/packagePcoCheck/pages/alarmInfo/rectificationInfo.vue";
const {proxy} = getCurrentInstance();
import topHeight from "@/common/topHeight";
let userInfo = ref(uni.getStorageSync('userInfo'));
let tabData = ref([
                  {name: '预警整改', value: '1'},
                  {name: '告警督办', value: '2'},

]);
let id = ref('')
let urgeShow = ref('')
let title = ref("查看")
onLoad((e) => {
  if (e.id) {
    id.value = e.id
    urgeShow.value = e.urgeShow
    if(urgeShow.value=="0"){
      title.value="督办";
    }

  }
})




let selectTab = ref(null);
let checkTab = (e) => {
    if(e!='1'){
        selectTab.value = e.value
    }else{
        selectTab.value = e
    }
};
onShow(()=>{
    checkTab(selectTab.value ? selectTab.value : '1')
})

</script>

<style lang="scss" scoped >
.index-all{
	width: 100vw;
	height: 100vh;
	background: #f6f6f6;
}

.top-tab{
	margin: 20rpx 20rpx 20rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	overflow-x: hidden;
	overflow-x: scroll;
	white-space: nowrap;
	flex: 0 0 auto;
	margin-right: 10px;
	.action {
		color: #0256FF;
	}
}
.noAction{
	color: #767676;
}
.a-center{
	justify-content: center
}
.s-two-padding{
	padding: 0 100rpx;
}
//2024-7-1整体调整
::v-deep .uv-tabs__wrapper__nav__item__text {
    font-size: 28rpx;
}

::v-deep .uv-textarea__field{
  text-align: left!important;
  padding: 5px!important;
}

</style>